<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Test extends Model
{
    //
    protected $table = 'test';



    public function setImgAttribute($img)
    {
        if (is_array($img)) {
            $this->attributes['img'] = implode(',',$img);
        }
    }

    public function getImgAttribute($img)
    {
        return explode(',',$img);
    }


}
